package org.lc.service.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.lc.platform.base.vo.SelectListVo;
import org.lc.service.system.entity.SysRole;

import java.util.List;

@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {


    @Select("""
            SELECT
                name AS label,
                id AS value,
                forbidden AS disabled
            FROM
            	sys_role
            WHERE
            	sys_role.delete_time IS NULL AND code!=#{code}
            """)
    List<SelectListVo> findRoleSelectList(@Param("code") String code);
}